package cn.truistic.enmicromsg;

import org.litepal.crud.DataSupport;

import cn.truistic.enmicromsg.common.util.PreferenceHelper;

/**
 * Created by admin on 2018/6/1.
 */

public class Message extends DataSupport {
    String  msgSvrId = "";
    String type = "";
    String createTime = "";
    String talket = "";
    String content = "";
    String wxCode = PreferenceHelper.getString("userName","");
    int isChatRoot = -1;
    String chatRoot = "";
    String status;  // 1：发送   0：接收   2：系统消息

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"msgSvrId\":\"")
                .append(msgSvrId).append('\"');
        sb.append(",\"type\":\"")
                .append(type).append('\"');
        sb.append(",\"createTime\":\"")
                .append(createTime).append('\"');
        sb.append(",\"talket\":\"")
                .append(talket).append('\"');
        sb.append(",\"content\":\"")
                .append(content).append('\"');
        sb.append(",\"wxCode\":\"")
                .append(wxCode).append('\"');
        sb.append(",\"isChatRoot\":")
                .append(isChatRoot);
        sb.append(",\"chatRoot\":\"")
                .append(chatRoot).append('\"');
        sb.append(",\"status\":\"")
                .append(status).append('\"');
        sb.append('}');
        return sb.toString();
    }

    public String getWxCode() {
        return wxCode;
    }

    public void setWxCode(String wxCode) {
        this.wxCode = wxCode;
    }

    public int getIsChatRoot() {
        return isChatRoot;
    }

    public void setIsChatRoot(int isChatRoot) {
        this.isChatRoot = isChatRoot;
    }

    public String getChatRoot() {
        return chatRoot;
    }

    public void setChatRoot(String chatRoot) {
        this.chatRoot = chatRoot;
    }


    public String getMsgSvrId() {
        return msgSvrId;
    }

    public void setMsgSvrId(String msgSvrId) {
        this.msgSvrId = msgSvrId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getTalker() {
        return talket;
    }

    public void setTalker(String talket) {
        this.talket = talket;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

//    public String getImgPath() {
//        return imgPath;
//    }
//
//    public void setImgPath(String imgPath) {
//        this.imgPath = imgPath;
//    }

}
